package ming.model.type;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name = "t_tobacco_publishtype")
public class Publishtype implements java.io.Serializable {

	// Fields

	private String id;
	private String name;
	private Set<Publish> publishs = new HashSet<Publish>(0);

	// Property accessors
	@Id
	@Column(name = "vcID", unique = true, nullable = false, length = 36)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@Column(name = "vcName", length = 200)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@OneToMany(fetch = FetchType.LAZY, mappedBy = "publishtype")
	public Set<Publish> getPublishs() {
		return this.publishs;
	}

	public void setPublishs(Set<Publish> publishs) {
		this.publishs = publishs;
	}
}